import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-04-18
 * Time: 20:16
 */
public class main {
    public static void move(char a,char b){
        System.out.println(a + "==>" + b);
    }
    public static void hanoi(int n,char a,char b,char c){
        if(n == 1){
            move(a,c);
            return;
        }
        hanoi(n - 1,a,c,b);  //把n - 1 个盘子从a移动到b（借助c）
        move(a,c);              //把第n个盘子从 a 移动到 c
        hanoi(n - 1,b,a,c);  //把n - 1个盘子从b移动到 c（借助a）
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        char A = 'A',B = 'B',C = 'C';
        hanoi(n,A,B,C);
    }
}
